home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-25 | 9.1 KB | 361 lines | [TEXT/CWIE] |
- // ==================================================
- // TouchMeAppleEvents.r
- // Copyright (C) 1996-1997 Mizutori Tetsuya
- // July 4, 1996; February 3, 1997; April 23, 1997.
- // ==================================================
- // All documents are pretty-printed in 10-point Geneva font.
-
- #define SystemSevenOrLater TRUE
-
- #include <Types.r>
- #include <SysTypes.r>
- #include <AEObjects.r>
- #include <AERegistry.r>
- #include <AEUserTermTypes.r>
- #include <AppleEvents.r>
- #include <ASRegistry.r>
-
- #include <PowerPlant.r>
-
- #include <AEPowerPlantSuite.h>
- #include <AETextSuite.h>
- #include <AEDebugSuite.h>
-
- // Macros for some common patterns...
- // (the files below assume the presence of these macros)
- #define Reserved4_ reserved, reserved, reserved, reserved
- #define Reserved8_ Reserved4_, Reserved4_
- #define Reserved12_ Reserved8_, Reserved4_
- #define ReservedVerb_ Reserved8_, verbEvent, reserved, reserved, reserved
- #define ReservedPrep_ Reserved8_, reserved, prepositionParam, notFeminine, notMasculine, singular
- #define ReservedApost_ Reserved8_, noApostrophe, notFeminine, notMasculine, singular
-
- // TouchMe AppleEvent Terminology
-
- #define USING_REZ_COMPILER TRUE
- #define typedef
- #define ETouchMe_Suite
- #define ETouchMePref_Class
- #define ETouchMeStamp_Class
- #define EnumTouchMe_Type
- #define EnumTouchMe_Flag
- #include "CTouchMeAppleEvents.h"
- #undef typedef
- #undef ETouchMe_Suite
- #undef ETouchMePref_Class
- #undef ETouchMeStamp_Class
- #undef EnumTouchMe_Type
- #undef EnumTouchMe_Flag
- #undef USING_REZ_COMPILER
-
-
- // --------------------------------------------------
- // • Apple Event Dispatching Table
- // --------------------------------------------------
-
- resource 'aedt' (1000, "touchMe Suite") {
- { /* array: 6 elements */
- /* [1] */
- kAETouchMeSuite, kAEGetPrefs, ae_GetPrefs,
- /* [2] */
- kAETouchMeSuite, kAESetPrefs, ae_SetPrefs,
- /* [3] */
- kAETouchMeSuite, kAELoadPrefs, ae_LoadPrefs,
- /* [4] */
- kAETouchMeSuite, kAESavePrefs, ae_SavePrefs,
- /* [5] */
- kAETouchMeSuite, kAETouch, ae_Touch,
- /* [6] */
- kAETouchMeSuite, kAEFetch, ae_Fetch
- }
- };
-
-
- // --------------------------------------------------
- // • Apple Event Terminology Extension
- // --------------------------------------------------
-
- resource 'aete' (0, "English") {
- 0x01, // major version in BCD
- 0x10, // minor version in BCD
- english, // language code
- roman, // script code
- { /* array Suites: 2 elements */
- /* [1] */
- "Required Suite", // suite name
- "Terms that every application should support", // suite description
- kAERequiredSuite, // suite ID
- 1, // suite level
- 1, // suite version
- {}, /* array Events: 0 elements */
- {}, /* array Classes: 0 elements */
- {}, /* array ComparisonOps: 0 elements */
- {}, /* array Enumerations: 0 elements */
-
- /* [2] */
- "touchMe Suite", // suite name
- "Update the date time stamp of creation & modification on the file",
- kAETouchMeSuite,
- 1,
- 1,
- { /* array Events: 6 elements */
- /* [1] */
- "get prefs", // event name
- "Get the settings information", // event description
- kAETouchMeSuite, // event class
- kAEGetPrefs, // event ID
- cTouchMePref, // reply type
- "list of current settings", // reply description
- replyRequired, // if the reply is required
- listOfItems, // if the reply must be a list
- notEnumerated, // if the type is enumerated
- notTightBindingFunction, // if the message has tight binding precedence
- ReservedVerb_, // these 12 bits are reserved
- typeAETouchMeType, // direct param type
- "creation or modification type", // direct param description
- directParamRequired, // if the direct param is required
- singleItem, // if the param must be a list
- enumerated, // if the type is enumerated
- doesntChangeState, // if the event changes server's state
- Reserved12_, // these 12 bits are reserved
- {}, /* array OtherParams: 0 elements */
-
- /* [2] */
- "set prefs", // event name
- "Set the settings information",
- kAETouchMeSuite,
- kAESetPrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- typeAETouchMeType,
- "creation or modification type",
- directParamRequired,
- singleItem,
- enumerated,
- changesState,
- Reserved12_,
- { /* array OtherParams: 1 elements */
- /* [1] */
- "to", // parameter name
- keyAEData, // parameter keyword
- typeWildCard, // parameter type
- "list of new settings", // parameter description
- required, // if param is optional
- singleItem, // if the param must be a list
- notEnumerated, // if the type is enumerated
- ReservedPrep_ // these 13 bits are reserved
- },
-
- /* [3] */
- "load prefs", // event name
- "Load the settings from preferences file",
- kAETouchMeSuite,
- kAELoadPrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- noParams,
- "",
- directParamOptional,
- singleItem,
- notEnumerated,
- doesntChangeState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [4] */
- "save prefs", // event name
- "Save the settings to preferences file",
- kAETouchMeSuite,
- kAESavePrefs,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- noParams,
- "",
- directParamOptional,
- singleItem,
- notEnumerated,
- doesntChangeState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [5] */
- "touch", // event name
- "Touch the files",
- kAETouchMeSuite,
- kAETouch,
- noReply,
- "",
- replyOptional,
- singleItem,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- // typeWildCard,
- typeAlias,
- "object[s] to touch; a file or list of files",
- directParamRequired,
- // singleItem,
- listOfItems,
- notEnumerated,
- changesState,
- Reserved12_,
- {}, /* array OtherParams: 0 elements */
-
- /* [6] */
- "fetch", // event name
- "Fetch the date time stamp of file, and set the fields",
- kAETouchMeSuite,
- kAEFetch,
- cTouchMeStamp,
- "creation and modification date time",
- replyRequired,
- listOfItems,
- notEnumerated,
- notTightBindingFunction,
- ReservedVerb_,
- // typeWildCard,
- typeAlias,
- "object[s] to fetch; a file or list of files",
- directParamRequired,
- // singleItem,
- listOfItems,
- notEnumerated,
- changesState,
- Reserved12_,
- {} /* array OtherParams: 0 elements */
-
- },
-
- { /* array Classes: 2 elements */
- /* [1] */
- "prefs", // class name
- cTouchMePref, // class ID
- "Settings information", // class description
- { /* array Properties: 3 elements */
- /* [1] */
- "enabled", // property name
- pPref_Enabled, // property ID
- typeBoolean, // property class
- "", // property description
- reserved,
- singleItem, // if the property must be a list
- notEnumerated, // if the type is enumerated
- readWrite, // can read or write it
- ReservedApost_, // these 12 bits are reserved
-
- /* [2] */
- "flag", // property name
- pPref_Flag,
- typeAETouchMeFlag,
- "",
- reserved,
- singleItem,
- enumerated,
- readWrite,
- ReservedApost_,
-
- /* [3] */
- "value", // property name
- pPref_Value,
- typeLongDateTime,
- "",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_
- },
- {}, /* array Elements: 0 elements */
-
- /* [2] */
- "time stamp", // class name
- cTouchMeStamp,
- "Creation and Modification date time",
- { /* array Properties: 2 elements */
- /* [1] */
- "creation date", // property name
- pStamp_Creation,
- typeLongDateTime,
- "creation date",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_,
-
- /* [2] */
- "modification date", // property name
- pStamp_Modification,
- typeLongDateTime,
- "modification date",
- reserved,
- singleItem,
- notEnumerated,
- readWrite,
- ReservedApost_
- },
- {}, /* array Elements: 0 elements */
-
- },
-
- {}, /* array ComparisonOps: 0 elements */
-
- { /* array Enumerations: 2 elements */
- /* [1] */
- typeAETouchMeType, // Enumeration ID
- { /* array Enumerators: 2 elements */
- /* [1] */
- "creation", // Enumerator name
- kEnumType_Creation, // Enumerator ID
- "creation type", // Enumerator comment
-
- /* [2] */
- "modification", // Enumerator name
- kEnumType_Modification,
- "modification type"
- },
-
- /* [2] */ // Enumeration ID
- typeAETouchMeFlag,
- { /* array Enumerators: 4 elements */
- /* [1] */
- "current", // Enumerator name
- kEnumFlag_Current,
- "by current date time",
-
- /* [2] */
- "exact", // Enumerator name
- kEnumFlag_Excact,
- "by exact date time",
-
- /* [3] */
- "firstone", // Enumerator name
- kEnumFlag_First,
- "by first item",
-
- /* [4] */
- "firstset", // Enumerator name
- kEnumFlag_FirstSet,
- "by first item and set"
- }
- }
- }
- };
-
- // end of resources
-